package com.psq.base.user.provider

import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.psq.base.user.manager.UserManager
import com.psq.core.common.provider.IUserInfoProvider
import com.psq.core.common.provider.ROUTER_USER_INFO_PROVIDER

@Route(path = ROUTER_USER_INFO_PROVIDER)
class UserInfoProvider : IUserInfoProvider {
    override fun getToken() =
        UserManager.getInstance().userUiModelLiveData.value?.userPreferences?.token ?: ""

    override fun logout() {
        UserManager.getInstance().logout()
    }


    override fun init(context: Context?) {}
}